package org.road0329.tools.proto_parse_tool.chargingpile;

public class BaseFrame {

    /**
     * 包含数据帧的数组
     */
    private byte[] data;
    /**
     * 数据帧内容长度
     */
    private int length;

    /**
     * 终端通信地址
     */
    private String commAddr;

    /**
     * 充电桩编码
     */
    private Integer pileId;

    /**
     * 企业编码
     *
     */
    private Integer eid;
    /**
     * 枪号
     */
    private Integer gunNo;

    /**
     * 原文
     */
    private String raw;

    /**
     * 读指针
     */
    private int readIndex;

    /**
     * register device/remove device/calldata/control device/datachange/commandRsp  for nb-iot
     */
    private int cmdType;

    /**
     * command status for nb-iot
     */
    private int status;

    /**
     * 命令编号 下发命令时返回的 fors nb-iot
     */
    private String commandId;

    public BaseFrame() {
    }

    /**
     * 构造函数
     *
     * @param data
     * @param length
     */
    public BaseFrame(byte[] data, int length) {
        this.data = data;
        this.length = length;
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public Byte getByte(int nIndex) {
        return data[nIndex];
    }

    public String getCommAddr() {
        return commAddr;
    }

    public void setCommAddr(String commAddr) {
        this.commAddr = commAddr;
    }

    public Integer getPileId() {
        return pileId;
    }

    public void setPileId(Integer pileId) {
        this.pileId = pileId;
    }

    public Integer getEid() {
        return eid;
    }

    public void setEid(Integer eid) {
        this.eid = eid;
    }

    public Integer getGunNo() {
        return gunNo;
    }

    public void setGunNo(Integer gunNo) {
        this.gunNo = gunNo;
    }

    public int getReadIndex() {
        return readIndex;
    }

    public void setReadIndex(int readIndex) {
        this.readIndex = readIndex;
    }

    public String getRaw() {
        return raw;
    }

    public void setRaw(String raw) {
        this.raw = raw;
    }

    public int getCmdType() {
        return cmdType;
    }

    public void setCmdType(int cmdType) {
        this.cmdType = cmdType;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getCommandId() {
        return commandId;
    }

    public void setCommandId(String commandId) {
        this.commandId = commandId;
    }
}
